<?php
namespace app\admin\validate;
use think\Validate;
class User extends Validate
{
    protected $rule = [
        'username'  =>  'require|min:2|unique:user',
        'password'   =>'require'
    ];
    protected $message = [
        'username.require'  =>  '用户名必填',
        'username.min'  =>  '用户名不能小于两个字',
        'username.unique'  =>  '用户名已经存在',
        'password.require'  =>  '密码必填',
    ];
}